<?php

namespace Roles\Form;

use Zend\Form\Form;

class ProfileSearchForm extends Form {

   public function __construct($name = null) {

      //we want to ignore the name passed
      parent::__construct('Busqueda de Perfiles');
      $this->setAttribute('method', 'post');
      $this->add(array(
         'name' => 'perfil_id',
         'attributes' => array(
            'type' => 'hidden',
         ),
      ));
      $this->add(array(
         'type' => 'Zend\Form\Element\Select',
         'name' => 'perfiles',
         'options' => array(
            'empty_option'  => 'Elija un perfil',
         ),
      ));

      $this->add(array(
         'name' => 'search_submit',
         'attributes' => array(
            'type' => 'submit',
            'value' => 'Go',
            'id' => 'submitbutton1',
         ),
      ));

      $this->add(array(
         'name' => 'save_submit',
         'attributes' => array(
            'type' => 'submit',
            'value' => 'Go',
            'id' => 'submitbutton2',
            'disabled' => 'true',
         ),
      ));

   }

}
